//Product.java
package factoryMethod;

/**
 *@author:youtubezou
 *@version:2012-7-6
 */
public interface Product {
	
}

class ConcreteProductA implements Product{
	private String name = "ConcreteProductA";
	
	public ConcreteProductA(String path) {
		name += ">>" + path;
	}
	
	public String toString () {
		return name;
	}
}

class ConcreteProductB implements Product{
	private String name = "ConcreteProductB";
	
	public ConcreteProductB(String path) {
		name += ">>" + path;
	}
	
	public String toString () {
		return name;
	}
}